#ifndef AREA_H_
#define AREA_H_

/**
* The side of an Area.
**/
enum Side
{
	None = 0,
	Top,
	Bottom,
	Left,
	Right
};

/**
* An area, containing the position and size of the rectangle.
* 
* @author dfoelber
**/
class Area
{
public:
	/**
	* Default constructor. Initializes everything to 0.
	**/
	Area();
	
	/**
	* Constructor that fills in the values of the area.
	* 
	* @param x X coordinate
	* @param y Y coordinate
	* @param width Width of the area
	* @param height Height of the area
	**/
	Area( int x, int y, int width, int height );
	
	/**
	* Deconstructor
	**/
	~Area();
	
	/**
	* Checks if the area defined by the parameters intersects with the area.
	* 
	* @param x X coordinate
	* @param y Y coordinate
	* @param width Width of the supplied area
	* @param height Height of the supplied area
	* @return If the supplied area intersects
	**/
	bool Intersects( int x, int y, int width, int height );
	
	/**
	* Sets the size of the area.
	* 
	* @param width The new width
	* @param height The new height
	**/
	void SetSize( int width, int height );
	
	/**
	* Sets the position of the area.
	* 
	* @param x The new X coordinate
	* @param y The new Y coordinate
	**/
	void SetPosition( int x, int y );
	
	/**
	* Gets the current X coordinate.
	* 
	* @return The X coordinate
	**/
	int GetX() const;
	
	/**
	* Gets the current Y coordinate.
	* 
	* @return The Y coordinate
	**/
	int GetY() const;
	
	/**
	* Gets the current width.
	* 
	* @return The width
	**/
	int GetWidth() const;
	
	/**
	* Gets the current height.
	* 
	* @return The height
	**/
	int GetHeight() const;
	
private:
	/// Current X coordinate
	int			x;
	/// Current Y coordinate
	int 		y;
	/// Current width
	int			width;
	/// Current height
	int			height;
};

#endif /*AREA_H_*/
